package demo03.Generic;

public class Demo02GenericClass {
    public static void main(String[] args) {
        GenericClass<Integer> gc = new GenericClass();
//        gc.setName("现在只能使用字符串类型");
//        System.out.println(gc.getName());
        gc.setName(1);
        System.out.println(gc.getName());

        GenericClass<String> gc1 = new GenericClass();
        gc1.setName("泛型的字符串类型");
        System.out.println(gc1.getName());
    }


}
